// See https://sequelize.org/master/manual/model-basics.html
// for more of what you can do here.
const Sequelize = require('sequelize');
const DataTypes = Sequelize.DataTypes;

module.exports = function (app) {
  const sequelizeClient = app.get('sequelizeClient');
  const cardrollVipcardroll = sequelizeClient.define('cardroll_vipcardroll', {
    checkoffcode: DataTypes.STRING, // 核销码
    vipid: DataTypes.STRING, // 会员id
    Cellnumber: DataTypes.STRING, // 手机号
    vipname: DataTypes.STRING, // 会员名称
    Cardrolltype: DataTypes.STRING, // 卡卷类型
    cardrollname: DataTypes.STRING, // 卡卷名称
    Ownedshop: DataTypes.STRING, // 所属店铺
    denomination: DataTypes.STRING, // 面额（元）
    balance: DataTypes.STRING, // 面额（元）
    state: DataTypes.STRING, // 状态
    Collectiontime: DataTypes.STRING, // 领取时间
  }, {
    hooks: {
      beforeCount(options) {
        options.raw = true;
      }
    }
  });

  // eslint-disable-next-line no-unused-vars
  cardrollVipcardroll.associate = function (models) {
    // Define associations here
    // See https://sequelize.org/master/manual/assocs.html
  };

  return cardrollVipcardroll;
};
